package de.jmda.gen.java;

import javax.lang.model.element.Name;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
import javax.lang.model.type.TypeMirror;
import javax.validation.constraints.NotNull;

import de.jmda.gen.java.ModifiersUtil.VisibilityModifier;

/**
 * Generator for field declarations.
 *
 * @author rwegner
 */
public interface FieldGenerator extends DeclarationGenerator
{
	DeclaredFieldGenerator getDeclaredFieldGenerator();
	void setDeclaredFieldGenerator(DeclaredFieldGenerator generator);

	void addAnnotation(@NotNull Class<?> annotation);
	void setVisibility(VisibilityModifier modifier);
	void setType(@NotNull Class<?> type);
	void setType(@NotNull TypeMirror type);
	void setType(@NotNull TypeElement type);
	/**
	 * use this method for primitive types only
	 * @param name
	 */
	void setType(@NotNull String name);
	void setTypeFrom(@NotNull VariableElement field);
	void setName(@NotNull String name);
	void setName(@NotNull Name name);
}